<?php if ($this->getPagination()->getTotalPages() > 1): ?>
<div class="paginationControl">

<!-- Previous page link -->
<?php if ($this->getPagination()->getPrevPage()): ?>
  <a href="<?php echo Epic::getUrl('blog/search/index', array('q' => $_GET['q'], 'page' =>  $this->getPagination()->getPrevPage())); ?>">&lt; Previous</a> |
<?php else: ?>
  <span>&lt; Previous</span> |
<?php endif; ?>

<!-- Numbered page links -->
<?php foreach ($this->getPagination()->getPages() as $page): ?>
  <?php if ($page != $this->getPagination()->getCurrentPage()): ?>
    <a href="<?php echo Epic::getUrl('blog/search/index', array('q' => $_GET['q'], 'page' => $page)); ?>">
        <?php echo $page; ?>
    </a> |
  <?php else: ?>
    <?php echo $page; ?> |
  <?php endif; ?>
<?php endforeach; ?>
 
<!-- Next page link -->
<?php if ($this->getPagination()->getNextPage()): ?>
  <a href="<?php echo Epic::getUrl('blog/search/index', array('q' => $_GET['q'], 'page' =>  $this->getPagination()->getNextPage())); ?>">Next &gt;</a>
<?php else: ?>
  <span>Next &gt;</span>
<?php endif; ?>

<div>Trang: <?php echo $this->getPagination()->getCurrentPage(); ?>/<?php echo $this->getPagination()->getTotalPages(); ?></div>

</div>
<?php endif; ?>